<!DOCTYPE html>
<html>
<head lang="en">

    <link rel="stylesheet" type="text/css" href="../css/navigation.css">
    <link rel="stylesheet" type="text/css" href="../css/cart_list.css">
    <script src="../javascript/jquery-3.1.1.min.js"></script>
    <script src="../javascript/lodash.js"></script>
    <script type="text/javascript" src="../javascript/cart_list.js" ></script>
    <script type="text/javascript" src="../javascript/jquery.tmpl.min.js" ></script>
    <script id="form" type="text/x-jquery.tmpl" >
         <tr>
                <td>${classification}</td>
                <td>${name}</td>
                <td>${price}</td>
                <td>${unit}</td>
                <td><button id=${id}sub class="sub">-</button><input type="text" id=${id}input class="click_button" value="${count}"readOnly="true"/><button id=${id}add class="add">+</button></td>
                <td id=${id}subtotal>{{if free_count>0}}${(count-free_count)*price}元(原价：${count*price}元){{else}}${count*price}元{{/if}}</td>

         </tr>
    </script>
    <meta charset="UTF-8">
    <title>购物车页面</title>
</head>
<body>
<div>
    <div id="navigation">
        <ul>
            <li><a href="home_list.html " class="go">Let's Go</a></li>
            <li><a href="home_list.html" class="tipspage">主页</a></li>
            <li><a href="item_list.html" class="goods">商品列表</a></li>
            <li><a href="cart_list.html" class="cart" id="cart"><img  src="../shopping_cart.png"/>购物车(<b id="sum_count"></b>)</a></li>
        </ul>
    </div>
    <div id="goods_list">
        <div id="items">
            <caption>购物清单</caption>
        </div>
        <table id="cart_list">
            <thead>
            <tr>
                <th class="classification">分类</th>
                <th class="name">名称</th>
                <th class="price">单价(元)</th>
                <th class="unit">单位</th>
                <th class="count">数量</th>
                <th class="subtotal">小计</th>
            </tr>
            </thead>
        </table>
        <div id="total">
            <p><span>总计:<span id="sum_money"></span></span></p>
            <button class="button">付款</button>
        </div>
</div>
</body>
</html>
